From 1694c6d1790236bce691eacbff00dae5dfa2c24f Mon Sep 17 00:00:00 2001 From: Justin Burkett Date: Fri, 15 Dec 2017 14:18:30 -0500 Subject: [PATCH] Improve which-key--process-define-key-args Specify Prefix Command as an explicit match string to cut down on false positives. --- which-key.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/which-key.el b/which-key.el index fdef15b424c..1523c00382c 100644 --- a/which-key.el +++ b/which-key.el @@ -919,8 +919,9 @@ as :before advice for `define-key'." (symbolp (cdr def))) (let ((key-desc (regexp-quote (key-description key)))) (push (cons (cons (format "%s\\'" key-desc) - (when (cdr def) - (format "\\`%s\\'" (symbol-name (cdr def))))) + (format "\\`%s\\'" (if (cdr def) + (symbol-name (cdr def)) + "Prefix Command"))) (cons nil (car def))) which-key-replacement-alist))))) -- 2.30.2